Skip to content

feat: initial structure for components and b2b flow #20103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Mar 26, 2025

Conversation

Matejk00
Copy link
Contributor

@Matejk00 Matejk00 commented Mar 20, 2025

Closes: CXSPA-9388

Major Changes Introduced

  • Added new OpfB2bCheckoutPaymentType component structure for B2B payment type handling
  • Implemented B2B account payment vs card payment type selection
  • Updated OpfCheckoutPaymentAndReview component for handling B2B payment review
  • Added payment method display functionality (new component)
  • Updated payment provider list selection and display
  • Created reusable OpfCheckoutReviewCard component for displaying review information
  • Created new OpfCheckoutReviewCartDetails component to handle cart information display: cart, entries and promotions
  • Added default B2B checkout configuration
  • Implemented checkout routing configuration
  • Set up CMS component mappings
  • Added SCSS files for components
  • Added proper spacing and layout styles
  • Created proper module hierarchy
  • Added necessary imports and exports
  • Added new translation keys for b2b checkout flow

@Matejk00 Matejk00 requested a review from a team as a code owner March 20, 2025 12:06
formControlName="poNumber"
type="text"
placeholder="{{ 'checkoutB2B.placeholder' | cxTranslate }}"
value="{{ cartPoNumber$ | async }}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it affect perf to has a sync directly in form attribute?
wondering if we should subscribe it once in 'div' or 'container'?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it may affect performance. I will try to fix this.

typeSelected?: string;
paymentTypesError = false;

isUpdating$ = combineLatest([
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seeing a number of methods without return type, fee free to add them even though in this it makes sens it is a boolean form method name.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code will be evaluating, but I will add all needed typing for the final version.


this.busy$.next(true);
this.checkoutPaymentTypeFacade
.setPaymentType(this.typeSelected, poNumberInput)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to unsubscribe or we are 100% sure it complete after 1 time?
In the doubt should we add 'take(1)' or sub.add + ngDestroy callback?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I will fix that.

@FollowTheFlo FollowTheFlo self-requested a review March 26, 2025 13:16
Copy link
Contributor

@FollowTheFlo FollowTheFlo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, happy with it.

@Matejk00 Matejk00 merged commit f9642f6 into epic/opf-b2b Mar 26, 2025
11 checks passed
@Matejk00 Matejk00 deleted the feature/CXSPA-9453 branch March 26, 2025 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants